from flask_login import UserMixin, login_user, login_required, logout_user, LoginManager

from db import db


login_manager = LoginManager()

class User(UserMixin, db.Model):
    id = db.Column(db.Integer, primary_key=True)


@login_manager.user_loader
def load_user(user_id):
    return User.query.get(int(user_id))